;var module = angular.module('CtrlsContent');
module.controller('WenkugoumailistCtrl',['$scope','$state','api_other','common_service','$stateParams',function($scope,$state,api_other,common_service,$stateParams){
	if($stateParams.type==1){
		$scope.backurl = 'wenkuinit';
	}else{
		$scope.backurl = 'wenkudetail';
	}
	$scope.list = [];
	$scope.total = 0;
	$scope.title = localStorage.bls_catname;
	$scope.event = {
		get:function(){
			var obj = {
				catId:localStorage.catId,
				type:2
			};
			var promise = api_other.wenkuprice(obj);
			promise.success(function(data){
				if(data.returnCode == 0){
					$scope.price = data.returnData.price;
					
				}
			});
		},
		submit:function(price,title){
			$state.go('wenkubuy',{price:price,title:title,type:$stateParams.type})
		}
	};
	$scope.event.get();
}])